package com.rainyun.rd.biz;

import com.rainyun.rc.config.NodeConfig;
import com.rainyun.rc.ioc.Beanzy;
import com.rainyun.rd.common.BeanRd;
import com.rainyun.rd.config.RdLang;
import org.bukkit.command.CommandSender;

/**通用业务类*/
@Beanzy
public class BizCommon {

    @BeanRd(BeanRd.BeansRd.NodeConf)
    NodeConfig ncf;

    public void sendMsg(CommandSender sd, String msg) {
        sd.sendMessage(msg.replace("&","§"));
    }

    public void sendWithPrefix(CommandSender sd, String msg) {
        msg = ncf.get(RdLang.prefix)+msg;
        msg = msg.replace("&","§");
        sd.sendMessage(msg);
    }

}
